home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 August: Tool Chest / Dev.CD Aug 94.toast / Tool Chest / Development Platforms / Macintosh Common Lisp Related / interfaces / PInterface Translator / PInterfaces / QuickTimeComponents.p < prev    next >
Encoding:
Text File  |  1993-09-16  |  56.7 KB  |  1,530 lines  |  [TEXT/MPS ]

  1.  
  2. {
  3. Created: Tuesday, October 13, 1992
  4.  QuickTimeComponents.p
  5.  Pascal Interface to the Macintosh Libraries
  6.  
  7.  Copyright Apple Computer, Inc. 1991, 1992
  8.  All rights reserved
  9.  
  10.  
  11. }
  12.  
  13.  
  14. {$IFC UNDEFINED UsingIncludes}
  15. {$SETC UsingIncludes := 0}
  16. {$ENDC}
  17.  
  18. {$IFC NOT UsingIncludes}
  19.  UNIT QuickTimeComponents;
  20.  INTERFACE
  21. {$ENDC}
  22.  
  23. {$IFC UNDEFINED UsingQuickTimeComponents}
  24. {$SETC UsingQuickTimeComponents := 1}
  25.  
  26. {$I+}
  27. {$SETC QuickTimeComponentsIncludes := UsingIncludes}
  28. {$SETC UsingIncludes := 1}
  29. {$IFC UNDEFINED UsingComponents}
  30. {$I $$Shell(PInterfaces)Components.p}
  31. {$ENDC}
  32. {$IFC UNDEFINED UsingImageCompression}
  33. {$I $$Shell(PInterfaces)ImageCompression.p}
  34. {$ENDC}
  35. {$IFC UNDEFINED UsingMovies}
  36. {$I $$Shell(PInterfaces)Movies.p}
  37. {$ENDC}
  38. {$IFC UNDEFINED UsingQuickDraw}
  39. {$I $$Shell(PInterfaces)QuickDraw.p}
  40. {$ENDC}
  41. {$IFC UNDEFINED UsingMenus}
  42. {$I $$Shell(PInterfaces)Menus.p}
  43. {$ENDC}
  44. {$IFC UNDEFINED UsingVideo}
  45. {$I $$Shell(PInterfaces)Video.p}
  46. {$ENDC}
  47. {$SETC UsingIncludes := QuickTimeComponentsIncludes}
  48.  
  49. CONST
  50.  
  51. {****
  52.  
  53.  Clock Component
  54.  
  55. ****}
  56. clockComponentType         = 'clok';
  57. systemTickClock         = 'tick';            { subtype: 60ths since boot }
  58. systemSecondClock         = 'seco';            { subtype: 1000000ths since boot }
  59. systemMillisecondClock    = 'mill';            { subtype: 1000ths since boot    }
  60. systemMicrosecondClock    = 'micr';            { subtype: 1000000ths since boot }
  61.  
  62. kClockRateIsLinear = 1;
  63. kClockImplementsCallBacks = 2;
  64.  
  65.  
  66.  
  67. kClockGetClockTimeSelect = $1;
  68. kClockNewCallBackSelect = $2;
  69. kClockDisposeCallBackSelect = $3;
  70. kClockCallMeWhenSelect = $4;
  71. kClockCancelCallBackSelect = $5;
  72. kClockRateChangedSelect = $6;
  73. kClockTimeChangedSelect = $7;
  74. kClockSetTimeBaseSelect = $8;
  75. kClockStartStopChangedSelect = $9;
  76. kClockGetRateSelect = $A;
  77.  
  78. { Same Calls }
  79. FUNCTION ClockGetTime(aClock: ComponentInstance;VAR out: TimeRecord): ComponentResult;
  80.  INLINE $2F3C,$4,$1,$7000,$A82A;
  81. FUNCTION GetClockTime(aClock: ComponentInstance;VAR out: TimeRecord): ComponentResult;
  82.  INLINE $2F3C,$4,$1,$7000,$A82A;
  83.  
  84. FUNCTION ClockNewCallBack(aClock: ComponentInstance;tb: TimeBase;callBackType: INTEGER): QTCallBack;
  85.  INLINE $2F3C,$6,$2,$7000,$A82A;
  86. FUNCTION ClockDisposeCallBack(aClock: ComponentInstance;cb: QTCallBack): ComponentResult;
  87.  INLINE $2F3C,$4,$3,$7000,$A82A;
  88. FUNCTION ClockCallMeWhen(clock: ComponentInstance;cb: QTCallBack;param1: LONGINT;
  89.  param2: LONGINT;param3: LONGINT): ComponentResult;
  90.  INLINE $2F3C,$10,$4,$7000,$A82A;
  91. FUNCTION ClockCancelCallBack(clock: ComponentInstance;cb: QTCallBack): ComponentResult;
  92.  INLINE $2F3C,$4,$5,$7000,$A82A;
  93. FUNCTION ClockRateChanged(clock: ComponentInstance;cb: QTCallBack): ComponentResult;
  94.  INLINE $2F3C,$4,$6,$7000,$A82A;
  95. FUNCTION ClockTimeChanged(clock: ComponentInstance;cb: QTCallBack): ComponentResult;
  96.  INLINE $2F3C,$4,$7,$7000,$A82A;
  97. FUNCTION ClockSetTimeBase(clock: ComponentInstance;tb: TimeBase): ComponentResult;
  98.  INLINE $2F3C,$4,$8,$7000,$A82A;
  99. FUNCTION ClockStartStopChanged(clock: ComponentInstance;cb: QTCallBack; startChanged: Boolean; stopChanged: Boolean): ComponentResult;
  100.  INLINE $2F3C,$8,$9,$7000,$A82A;
  101. FUNCTION ClockGetRate(aClock:ComponentInstance;VAR rate:Fixed) :ComponentResult;
  102.  INLINE $2F3C,$4,$A,$7000,$A82A;
  103.  
  104.  
  105.  
  106. TYPE
  107. { Sequence Grab Component }
  108. SeqGrabComponent = ComponentInstance;
  109. SGChannel = ComponentInstance;
  110.  
  111. CONST
  112. SeqGrabComponentType = 'barg';
  113. SeqGrabChannelType = 'sgch';
  114.  
  115. SeqGrabPanelType = 'sgpn';
  116. SeqGrabCompressionPanelType = 'comp';
  117. SeqGrabSourcePanelType = 'sour';
  118.  
  119. seqGrabToDisk = 1;
  120. seqGrabToMemory = 2;
  121. seqGrabUseTempMemory = 4;
  122. seqGrabAppendToFile = 8;
  123. seqGrabDontAddMovieResource = $10;
  124. seqGrabDontMakeMovie = $20;
  125. seqGrabPreExtendFile = $40;
  126.  
  127. TYPE
  128. SeqGrabDataOutputEnum = LONGINT;
  129.  
  130. CONST
  131. seqGrabRecord = 1;
  132. seqGrabPreview = 2;
  133. seqGrabPlayDuringRecord = 4;
  134.  
  135. TYPE 
  136. SeqGrabUsageEnum = LONGINT;
  137.  
  138. CONST
  139. seqGrabHasBounds = 1;
  140. seqGrabHasVolume = 2;
  141. seqGrabHasDiscreteSamples = 4;
  142.  
  143. TYPE
  144. SeqGrabChannelInfoEnum = LONGINT;
  145.  
  146. SeqGrabFrameInfo = RECORD
  147.  frameOffset: LONGINT;
  148.  frameTime: LONGINT;
  149.  frameSize: LONGINT;
  150.  frameChannel: SGChannel;
  151.  frameRefCon: LONGINT;
  152.  END;
  153.  
  154. CONST
  155. grabPictOffScreen = 1;
  156. grabPictIgnoreClip = 2;
  157.  
  158. sgFlagControlledGrab = 1;
  159.  
  160. TYPE
  161. SGDataProc = ProcPtr;
  162.  
  163. SGDeviceName = RECORD
  164.         name    : Str63;
  165.         icon    : Handle;
  166.         flags    : LONGINT;
  167.         refCon    : LONGINT;
  168.         reserved: LONGINT;        { zero }
  169. END;
  170.  
  171. CONST
  172. sgDeviceNameFlagDeviceUnavailable = 1;
  173.  
  174. TYPE
  175. SGDeviceListPtr = ^SGDeviceListRecord;
  176. SGDeviceList = ^SGDeviceListPtr;
  177. SGDeviceListRecord = RECORD
  178.     count:INTEGER;
  179.     selectedIndex:INTEGER;
  180.     reserved:LONGINT;
  181.     entry:ARRAY[0..0] OF SGDeviceName;
  182. END;
  183. AlignmentProcRecordPtr = ProcPtr;
  184.  
  185. CONST
  186. sgDeviceListWithIcons = 1;
  187. sgDeviceListDontCheckAvailability = 2;
  188.  
  189. seqGrabWriteAppend = 0;
  190. seqGrabWriteReserve = 1;
  191. seqGrabWrite = 2;
  192.  
  193. seqGrabUnpause = 0;
  194. seqGrabPause = 1;
  195. seqGrabPauseForMenu = 3;
  196.  
  197. channelFlagDontOpenResFile = 2;
  198. channelFlagHasDependency = 4;
  199.  
  200. TYPE
  201. SGModalFilterProcPtr = ProcPtr;
  202.  
  203. CONST
  204. sgPanelFlagForPanel = 1;
  205.  
  206.  
  207. channelPlayNormal = 0;
  208. channelPlayFast = 1;
  209. channelPlayHighQuality = 2;
  210. channelPlayAllData = 4;
  211.  
  212.  
  213. FUNCTION SGInitialize(s: SeqGrabComponent): ComponentResult;
  214.  INLINE $2F3C,$0,$1,$7000,$A82A;
  215.  
  216. FUNCTION SGSetDataOutput(s: SeqGrabComponent;movieFile: FSSpec;whereFlags: LONGINT): ComponentResult;
  217.  INLINE $2F3C,$8,$2,$7000,$A82A;
  218. FUNCTION SGGetDataOutput(s: SeqGrabComponent;VAR movieFile: FSSpec;VAR whereFlags: LONGINT): ComponentResult;
  219.  INLINE $2F3C,$8,$3,$7000,$A82A;
  220.  
  221. FUNCTION SGSetGWorld(s: SeqGrabComponent;gp: CGrafPtr;gd: GDHandle): ComponentResult;
  222.  INLINE $2F3C,$8,$4,$7000,$A82A;
  223. FUNCTION SGGetGWorld(s: SeqGrabComponent;VAR gp: CGrafPtr;VAR gd: GDHandle): ComponentResult;
  224.  INLINE $2F3C,$8,$5,$7000,$A82A;
  225.  
  226. FUNCTION SGNewChannel(s: SeqGrabComponent;channelType: OSType;VAR ref: SGChannel): ComponentResult;
  227.  INLINE $2F3C,$8,$6,$7000,$A82A;
  228. FUNCTION SGDisposeChannel(s: SeqGrabComponent;c: SGChannel): ComponentResult;
  229.  INLINE $2F3C,$4,$7,$7000,$A82A;
  230.  
  231. FUNCTION SGStartPreview(s: SeqGrabComponent): ComponentResult;
  232.  INLINE $2F3C,$0,$10,$7000,$A82A;
  233. FUNCTION SGStartRecord(s: SeqGrabComponent): ComponentResult;
  234.  INLINE $2F3C,$0,$11,$7000,$A82A;
  235. FUNCTION SGIdle(s: SeqGrabComponent): ComponentResult;
  236.  INLINE $2F3C,$0,$12,$7000,$A82A;
  237. FUNCTION SGStop(s: SeqGrabComponent): ComponentResult;
  238.  INLINE $2F3C,$0,$13,$7000,$A82A;
  239.  
  240. FUNCTION SGPause(s: SeqGrabComponent;pause: BOOLEAN): ComponentResult;
  241.  INLINE $2F3C,$2,$14,$7000,$A82A;
  242.  
  243. FUNCTION SGPrepare(s: SeqGrabComponent;prepareForPreview: BOOLEAN;prepareForRecord: BOOLEAN): ComponentResult;
  244.  INLINE $2F3C,$4,$15,$7000,$A82A;
  245. FUNCTION SGRelease(s: SeqGrabComponent): ComponentResult;
  246.  INLINE $2F3C,$0,$16,$7000,$A82A;
  247.  
  248. FUNCTION SGGetMovie(s: SeqGrabComponent): Movie;
  249.  INLINE $2F3C,$0,$17,$7000,$A82A;
  250.  
  251. FUNCTION SGSetMaximumRecordTime(s: SeqGrabComponent;ticks: LONGINT): ComponentResult;
  252.  INLINE $2F3C,$4,$18,$7000,$A82A;
  253. FUNCTION SGGetMaximumRecordTime(s: SeqGrabComponent;VAR ticks: LONGINT): ComponentResult;
  254.  INLINE $2F3C,$4,$19,$7000,$A82A;
  255.  
  256. FUNCTION SGGetStorageSpaceRemaining(s: SeqGrabComponent;VAR bytes: LONGINT): ComponentResult;
  257.  INLINE $2F3C,$4,$1A,$7000,$A82A;
  258. FUNCTION SGGetTimeRemaining(s: SeqGrabComponent;VAR ticksLeft: LONGINT): ComponentResult;
  259.  INLINE $2F3C,$4,$1B,$7000,$A82A;
  260.  
  261.  
  262. FUNCTION SGGrabPict(s: SeqGrabComponent; VAR p: PicHandle; bounds: Rect;
  263.  offscreenDepth: INTEGER; grabPictFlags: LONGINT): ComponentResult;
  264.  INLINE $2F3C,$E,$1C,$7000,$A82A;
  265.  
  266. FUNCTION SGGetLastMovieResID(s: SeqGrabComponent; VAR resID: INTEGER): ComponentResult;
  267.  INLINE $2F3C,$4,$1D,$7000,$A82A;
  268.  
  269. FUNCTION SGSetFlags(s: SeqGrabComponent; sgFlags: LONGINT): ComponentResult;
  270.  INLINE $2F3C,$4,$1E,$7000,$A82A;
  271. FUNCTION SGGetFlags(s: SeqGrabComponent; VAR sgFlags: LONGINT): ComponentResult;
  272.  INLINE $2F3C,$4,$1F,$7000,$A82A;
  273.  
  274. FUNCTION SGSetDataProc (s:SeqGrabComponent;proc:SGDataProc;refCon:LONGINT):ComponentResult;
  275.  INLINE $2F3C,$8,$20,$7000,$A82A;
  276. FUNCTION SGNewChannelFromComponent (s:SeqGrabComponent;VAR newChannel:SGChannel; 
  277.     sgChannelComponent:Component):ComponentResult;
  278.  INLINE $2F3C,$8,$21,$7000,$A82A;
  279. FUNCTION SGDisposeDeviceList (s:SeqGrabComponent;list:SGDeviceList):ComponentResult;
  280.  INLINE $2F3C,$4,$22,$7000,$A82A;
  281. FUNCTION SGAppendDeviceListToMenu (s:SeqGrabComponent;list:SGDeviceList;mh: MenuHandle):ComponentResult;
  282.  INLINE $2F3C,$8,$23,$7000,$A82A;
  283. FUNCTION SGSetSettings (s:SeqGrabComponent; ud:UserData;flags:LONGINT):ComponentResult;
  284.  INLINE $2F3C,$8,$24,$7000,$A82A;
  285. FUNCTION SGGetSettings (s:SeqGrabComponent; VAR ud:UserData; flags:LONGINT):ComponentResult;
  286.  INLINE $2F3C,$8,$25,$7000,$A82A;
  287. FUNCTION SGGetIndChannel (s:SeqGrabComponent;index:INTEGER; VAR ref: SGChannel;VAR chanType: OSType):ComponentResult;
  288.  INLINE $2F3C,$A,$26,$7000,$A82A;
  289. FUNCTION SGUpdate (s:SeqGrabComponent; updateRgn:RgnHandle):ComponentResult;
  290.  INLINE $2F3C,$4,$27,$7000,$A82A;
  291. FUNCTION SGGetPause (s:SeqGrabComponent; VAR paused:Byte):ComponentResult;
  292.  INLINE $2F3C,$4,$28,$7000,$A82A;
  293. FUNCTION SGSettingsDialog (s:SeqGrabComponent;c:SGChannel; numPanels:INTEGER;
  294.     VAR panelList:Component; flags:LONGINT; proc:SGModalFilterProcPtr ; procRefNum:LONGINT):ComponentResult;
  295.  INLINE $2F3C,$16,$29,$7000,$A82A;
  296. FUNCTION SGGetAlignmentProc (s:SeqGrabComponent;alignmentProc:AlignmentProcRecordPtr ):ComponentResult;
  297.  INLINE $F3C,$4,$2A,$7000,$A82A;
  298. FUNCTION SGSetChannelSettings (s:SeqGrabComponent;c:SGChannel; ud:UserData;flags:LONGINT):ComponentResult;
  299.  INLINE $2F3C,$C,$2B,$7000,$A82A;
  300. FUNCTION SGGetChannelSettings (s:SeqGrabComponent;c:SGChannel; VAR ud:UserData;flags:LONGINT):ComponentResult;
  301.  INLINE $2F3C,$C,$2C,$7000,$A82A;
  302.  
  303.  {   calls from Channel to seqGrab   }
  304. FUNCTION SGWriteMovieData(s: SeqGrabComponent;c: SGChannel;p: Ptr;len: LONGINT;
  305.  VAR offset: LONGINT): ComponentResult;
  306.  INLINE $2F3C,$10,$100,$7000,$A82A;
  307. FUNCTION SGAddFrameReference(s: SeqGrabComponent;VAR frameInfo: SeqGrabFrameInfo): ComponentResult;
  308.  INLINE $2F3C,$4,$101,$7000,$A82A;
  309. FUNCTION SGGetNextFrameReference(s: SeqGrabComponent;VAR frameInfo: SeqGrabFrameInfo;
  310.  VAR frameDuration: TimeValue;VAR frameNumber: LONGINT): ComponentResult;
  311.  INLINE $2F3C,$C,$102,$7000,$A82A;
  312. FUNCTION SGGetTimeBase(s: SeqGrabComponent;VAR tb: TimeBase): ComponentResult;
  313.  INLINE $2F3C,$4,$103,$7000,$A82A;
  314. FUNCTION SGSortDeviceList (s:SeqGrabComponent;list:SGDeviceList):ComponentResult;
  315.  INLINE $2F3C,$4,$104,$7000,$A82A;
  316. FUNCTION SGAddMovieData (s:SeqGrabComponent;c:SGChannel;p:Ptr;len:LONGINT; VAR offset:LONGINT; 
  317.     chRefCon:LONGINT; time:TimeValue; writeType:INTEGER):ComponentResult;
  318.  INLINE $2F3C,$1A,$105,$7000,$A82A;
  319. FUNCTION SGChangedSource (s:SeqGrabComponent;c:SGChannel):ComponentResult;
  320.  INLINE $2F3C,$4,$106,$7000,$A82A;
  321.  
  322.  
  323.  
  324.  {   General Channel Routines   }
  325. FUNCTION SGSetChannelUsage(c: SGChannel;usage: LONGINT): ComponentResult;
  326.  INLINE $2F3C,$4,$80,$7000,$A82A;
  327. FUNCTION SGGetChannelUsage(c: SGChannel;VAR usage: LONGINT): ComponentResult;
  328.  INLINE $2F3C,$4,$81,$7000,$A82A;
  329.  
  330. FUNCTION SGSetChannelBounds(c: SGChannel;bounds: Rect): ComponentResult;
  331.  INLINE $2F3C,$4,$82,$7000,$A82A;
  332. FUNCTION SGGetChannelBounds(c: SGChannel;VAR bounds: Rect): ComponentResult;
  333.  INLINE $2F3C,$4,$83,$7000,$A82A;
  334.  
  335. FUNCTION SGSetChannelVolume(c: SGChannel;volume: INTEGER): ComponentResult;
  336.  INLINE $2F3C,$2,$84,$7000,$A82A;
  337. FUNCTION SGGetChannelVolume(c: SGChannel;VAR volume: INTEGER): ComponentResult;
  338.  INLINE $2F3C,$4,$85,$7000,$A82A;
  339.  
  340. FUNCTION SGGetChannelInfo(c: SGChannel;VAR channelInfo: LONGINT): ComponentResult;
  341.  INLINE $2F3C,$4,$86,$7000,$A82A;
  342.  
  343. FUNCTION SGSetChannelPlayFlags(c: SGChannel;playFlags: LONGINT): ComponentResult;
  344.  INLINE $2F3C,$4,$87,$7000,$A82A;
  345. FUNCTION SGGetChannelPlayFlags(c: SGChannel;VAR playFlags: LONGINT): ComponentResult;
  346.  INLINE $2F3C,$4,$88,$7000,$A82A;
  347.  
  348. FUNCTION SGSetChannelMaxFrames(c: SGChannel;frameCount: LONGINT): ComponentResult;
  349.  INLINE $2F3C,$4,$89,$7000,$A82A;
  350. FUNCTION SGGetChannelMaxFrames(c: SGChannel;VAR frameCount: LONGINT): ComponentResult;
  351.  INLINE $2F3C,$4,$8A,$7000,$A82A;
  352.  
  353. FUNCTION SGSetChannelRefCon(c: SGChannel;refCon: LONGINT): ComponentResult;
  354.  INLINE $2F3C,$4,$8B,$7000,$A82A;
  355.  
  356. FUNCTION SGSetChannelClip (c:SGChannel; theClip:RgnHandle ):ComponentResult;
  357.  INLINE $2F3C,$4,$8C,$7000,$A82A;
  358.  
  359. FUNCTION SGGetChannelClip (c:SGChannel ;VAR theClip:RgnHandle):ComponentResult;
  360.  INLINE $2F3C,$4,$8D,$7000,$A82A;
  361.  
  362. FUNCTION SGGetChannelSampleDescription (c:SGChannel;sampleDesc:Handle):ComponentResult;
  363.  INLINE $2F3C,$4,$8E,$7000,$A82A;
  364.  
  365. FUNCTION SGGetChannelDeviceList (c:SGChannel; selectionFlags:LONGINT;VAR list: SGDeviceList):ComponentResult;
  366.  INLINE $2F3C,$8,$8F,$7000,$A82A;
  367.  
  368. FUNCTION SGSetChannelDevice (c:SGChannel; name:StringPtr):ComponentResult;
  369.  INLINE $2F3C,$4,$90,$7000,$A82A;
  370.  
  371. FUNCTION SGSetChannelMatrix (c:SGChannel; VAR m:MatrixRecord):ComponentResult;
  372.  INLINE $2F3C,$4,$91,$7000,$A82A;
  373.  
  374. FUNCTION SGGetChannelMatrix (c:SGChannel; VAR m:MatrixRecord):ComponentResult;
  375.  INLINE $2F3C,$4,$92,$7000,$A82A;
  376.  
  377. FUNCTION SGGetChannelTimeScale (c:SGChannel; VAR scale:TimeScale):ComponentResult;
  378.  INLINE $2F3C,$4,$93,$7000,$A82A;
  379.  
  380. {   calls from seqGrab to Channel   }
  381. FUNCTION SGInitChannel(c: SGChannel;owner: SeqGrabComponent): ComponentResult;
  382.  INLINE $2F3C,$4,$180,$7000,$A82A;
  383. FUNCTION SGWriteSamples(c: SGChannel;m: Movie;theFile: AliasHandle): ComponentResult;
  384.  INLINE $2F3C,$8,$181,$7000,$A82A;
  385. FUNCTION SGGetDataRate(c: SGChannel;VAR bytesPerSecond: LONGINT): ComponentResult;
  386.  INLINE $2F3C,$4,$182,$7000,$A82A;
  387. FUNCTION SGAlignChannelRect (c:SGChannel; VAR r:Rect):ComponentResult;
  388.  INLINE $2F3C,$4,$183,$7000,$A82A;
  389.  
  390. FUNCTION SGPanelGetDitl(s:SeqGrabComponent; VAR ditl:Handle):ComponentResult;
  391.  INLINE $2F3C,$4,$200,$7000,$A82A;
  392. FUNCTION SGPanelGetTitle (s:SeqGrabComponent; title:Str255 ):ComponentResult;
  393.  INLINE $2F3C,$4,$201,$7000,$A82A;
  394. FUNCTION SGPanelCanRun(s:SeqGrabComponent; c:SGChannel):ComponentResult;
  395.  INLINE $2F3C,$4,$202,$7000,$A82A;
  396. FUNCTION SGPanelInstall (s:SeqGrabComponent; c:SGChannel; d: DialogPtr; itemOffset:INTEGER):ComponentResult;
  397.  INLINE $2F3C,$A,$203,$7000,$A82A;
  398. FUNCTION SGPanelEvent(s:SeqGrabComponent; c:SGChannel; d: DialogPtr; itemOffset:INTEGER;
  399.         VAR theEvent:EventRecord; VAR itemHit:INTEGER; VAR handled:BOOLEAN):ComponentResult;
  400.  INLINE $2F3C,$16,$204,$7000,$A82A;
  401. FUNCTION SGPanelItem(s:SeqGrabComponent; c:SGChannel;d: DialogPtr; 
  402.     itemOffset:INTEGER; itemNum: INTEGER) :ComponentResult;
  403.  INLINE $2F3C,$C,$205,$7000,$A82A;
  404. FUNCTION SGPanelRemove(s:SeqGrabComponent; c:SGChannel; d: DialogPtr; 
  405.     itemOffset:INTEGER):ComponentResult;
  406.  INLINE $2F3C,$A,$206,$7000,$A82A;
  407. FUNCTION SGPanelSetGrabber(s:SeqGrabComponent; sg:SeqGrabComponent ):ComponentResult;
  408.  INLINE $2F3C,$4,$207,$7000,$A82A;
  409. FUNCTION SGPanelSetResFile(s:SeqGrabComponent;  resRef:INTEGER):ComponentResult;
  410.  INLINE $2F3C,$2,$208,$7000,$A82A;
  411. FUNCTION SGPanelGetSettings(s:SeqGrabComponent; c:SGChannel; VAR ud:UserData;
  412.     flags:LONGINT) :ComponentResult;
  413.  INLINE $2F3C,$C,$209,$7000,$A82A;
  414. FUNCTION SGPanelSetSettings(s:SeqGrabComponent; c:SGChannel; ud:UserData;
  415.      flags:LONGINT):ComponentResult;
  416.  INLINE $2F3C,$C,$20A,$7000,$A82A;
  417. FUNCTION SGPanelValidateInput(s:SeqGrabComponent; VAR ok:BOOLEAN) :ComponentResult;
  418.  INLINE $2F3C,$4,$20B,$7000,$A82A;
  419.  
  420.  
  421. TYPE
  422. { Video Routines }
  423.  
  424. SGCompressInfo = PACKED RECORD
  425.   buffer: Ptr;
  426.   bufferSize: LONGINT;
  427.   similarity: CHAR;
  428.   reserved: CHAR;
  429.  END;
  430.  
  431. GrabProc = ProcPtr;
  432. GrabCompleteProc = ProcPtr;
  433. DisplayProc = ProcPtr;
  434. CompressProc = ProcPtr;
  435. CompressCompleteProc = ProcPtr;
  436. AddFrameProc = ProcPtr;
  437. TransferFrameProc = ProcPtr;
  438. GrabCompressCompleteProc = ProcPtr;
  439. DisplayCompressProc = ProcPtr;
  440.  
  441. VideoBottles = RECORD
  442.  procCount: INTEGER;
  443.  grabProc: GrabProc;
  444.  grabCompleteProc: GrabCompleteProc;
  445.  displayProc: DisplayProc;
  446.  compressProc: CompressProc;
  447.  compressCompleteProc: CompressCompleteProc;
  448.  addFrameProc: AddFrameProc;
  449.  transferFrameProc: TransferFrameProc;
  450.  grabCompressCompleteProc:GrabCompressCompleteProc;
  451.  displayCompressProc:DisplayCompressProc;
  452.  END;
  453.  
  454.  
  455.  
  456.  
  457. FUNCTION SGGetSrcVideoBounds(c: SGChannel;VAR r: Rect): ComponentResult;
  458.  INLINE $2F3C,$4,$100,$7000,$A82A;
  459. FUNCTION SGSetVideoRect(c: SGChannel;r: Rect): ComponentResult;
  460.  INLINE $2F3C,$4,$101,$7000,$A82A;
  461. FUNCTION SGGetVideoRect(c: SGChannel;VAR r: Rect): ComponentResult;
  462.  INLINE $2F3C,$4,$102,$7000,$A82A;
  463.  
  464. FUNCTION SGGetVideoCompressorType(c: SGChannel;VAR compressorType: OSType): ComponentResult;
  465.  INLINE $2F3C,$4,$103,$7000,$A82A;
  466. FUNCTION SGSetVideoCompressorType(c: SGChannel;compressorType: OSType): ComponentResult;
  467.  INLINE $2F3C,$4,$104,$7000,$A82A;
  468.  
  469. FUNCTION SGSetVideoCompressor(c: SGChannel;depth: INTEGER;compressor: CompressorComponent;
  470.  spatialQuality: CodecQ;temporalQuality: CodecQ;keyFrameRate: LONGINT): ComponentResult;
  471.  INLINE $2F3C,$12,$105,$7000,$A82A;
  472. FUNCTION SGGetVideoCompressor(c: SGChannel;VAR depth: INTEGER;VAR compressor: CompressorComponent;
  473.  VAR spatialQuality: CodecQ;VAR temporalQuality: CodecQ;VAR keyFrameRate: LONGINT): ComponentResult;
  474.  INLINE $2F3C,$14,$106,$7000,$A82A;
  475.  
  476. FUNCTION SGGetVideoDigitizerComponent(c: SGChannel): ComponentInstance;
  477.  INLINE $2F3C,$0,$107,$7000,$A82A;
  478. FUNCTION SGSetVideoDigitizerComponent(c: SGChannel;vdig: ComponentInstance): ComponentResult;
  479.  INLINE $2F3C,$4,$108,$7000,$A82A;
  480. FUNCTION SGVideoDigitizerChanged(c: SGChannel): ComponentResult;
  481.  INLINE $2F3C,$0,$109,$7000,$A82A;
  482.  
  483. FUNCTION SGSetVideoBottlenecks(c: SGChannel;VAR vb: VideoBottles): ComponentResult;
  484.  INLINE $2F3C,$4,$10A,$7000,$A82A;
  485. FUNCTION SGGetVideoBottlenecks(c: SGChannel;VAR vb: VideoBottles): ComponentResult;
  486.  INLINE $2F3C,$4,$10B,$7000,$A82A;
  487.  
  488. FUNCTION SGGrabFrame(c: SGChannel;bufferNum: INTEGER): ComponentResult;
  489.  INLINE $2F3C,$2,$10C,$7000,$A82A;
  490. FUNCTION SGGrabFrameComplete(c: SGChannel;bufferNum:INTEGER;VAR done:Boolean): ComponentResult;
  491.  INLINE $2F3C,$6,$10D,$7000,$A82A;
  492.  
  493. FUNCTION SGDisplayFrame(c: SGChannel;bufferNum: INTEGER;mp: MatrixRecord;
  494.  clipRgn: RgnHandle): ComponentResult;
  495.  INLINE $2F3C,$A,$10E,$7000,$A82A;
  496. FUNCTION SGCompressFrame(c: SGChannel;bufferNum:INTEGER): ComponentResult;
  497.  INLINE $2F3C,$2,$10F,$7000,$A82A;
  498. FUNCTION SGCompressFrameComplete(c: SGChannel;bufferNum:INTEGER;VAR done:Boolean;
  499.  VAR ci:SGCompressInfo): ComponentResult;
  500.  INLINE $2F3C,$A,$110,$7000,$A82A;
  501. FUNCTION SGAddFrame(c: SGChannel;bufferNum:INTEGER;atTime: TimeValue;scale: TimeScale;
  502.  ci: SGCompressInfo): ComponentResult;
  503.  INLINE $2F3C,$E,$111,$7000,$A82A;
  504.  
  505. FUNCTION SGTransferFrameForCompress(c: SGChannel;bufferNum:INTEGER;mp: MatrixRecord;
  506.  clipRgn: RgnHandle): ComponentResult;
  507.  INLINE $2F3C,$A,$112,$7000,$A82A;
  508.  
  509. FUNCTION SGSetCompressBuffer(c: SGChannel;depth: INTEGER;compressSize: Rect): ComponentResult;
  510.  INLINE $2F3C,$6,$113,$7000,$A82A;
  511.  
  512. FUNCTION SGGetCompressBuffer(c: SGChannel;VAR depth: INTEGER; VAR compressSize: Rect): ComponentResult;
  513.  INLINE $2F3C,$8,$114,$7000,$A82A;
  514.  
  515. FUNCTION SGGetBufferInfo(c: SGChannel;bufferNum: INTEGER; VAR bufferPM: PixMapHandle;
  516.  VAR bufferRect: Rect;VAR compressBuffer: GWorldPtr;
  517.  VAR compressBufferRect: Rect): ComponentResult;
  518.  INLINE $2F3C,$12,$115,$7000,$A82A;
  519.  
  520. FUNCTION SGSetUseScreenBuffer (c:SGChannel; useScreenBuffer:BOOLEAN ):ComponentResult;  
  521.  INLINE $2F3C,$2,$116,$7000,$A82A;
  522.  
  523. FUNCTION SGGetUseScreenBuffer (c:SGChannel; VAR useScreenBuffer:BOOLEAN):ComponentResult;  
  524.  INLINE $2F3C,$4,$117,$7000,$A82A;
  525.  
  526. FUNCTION SGGrabCompressComplete (c:SGChannel; VAR done:BOOLEAN; VAR ci:SGCompressInfo; VAR tr:TimeRecord) :ComponentResult; 
  527.  INLINE $2F3C,$C,$118,$7000,$A82A;
  528. FUNCTION SGDisplayCompress (c:SGChannel; dataPtr:Ptr;desc:ImageDescriptionHandle; VAR mp: MatrixRecord; clipRgn:RgnHandle ):ComponentResult;  
  529.  INLINE $2F3C,$10,$119,$7000,$A82A;
  530.  
  531. FUNCTION SGSetFrameRate (c:SGChannel; frameRate:Fixed ):ComponentResult;  
  532.  INLINE $2F3C,$4,$11A,$7000,$A82A;
  533.  
  534. FUNCTION SGGetFrameRate (c:SGChannel; VAR frameRate:Fixed):ComponentResult;  
  535.  INLINE $2F3C,$4,$11B,$7000,$A82A;
  536.  
  537.  
  538.  
  539.  
  540. {   Sound Routines   }
  541. FUNCTION SGSetSoundInputDriver(c: SGChannel;driverName: Str255): ComponentResult;
  542.  INLINE $2F3C,$4,$100,$7000,$A82A;
  543. FUNCTION SGGetSoundInputDriver(c: SGChannel): LONGINT;
  544.  INLINE $2F3C,$0,$101,$7000,$A82A;
  545. FUNCTION SGSoundInputDriverChanged(c: SGChannel): ComponentResult;
  546.  INLINE $2F3C,$0,$102,$7000,$A82A;
  547.  
  548. FUNCTION SGSetSoundRecordChunkSize(c: SGChannel;seconds: LONGINT): ComponentResult;
  549.  INLINE $2F3C,$4,$103,$7000,$A82A;
  550. FUNCTION SGGetSoundRecordChunkSize(c: SGChannel): LONGINT;
  551.  INLINE $2F3C,$0,$104,$7000,$A82A;
  552.  
  553. FUNCTION SGSetSoundInputRate(c: SGChannel;rate: Fixed): ComponentResult;
  554.  INLINE $2F3C,$4,$105,$7000,$A82A;
  555. FUNCTION SGGetSoundInputRate(c: SGChannel): Fixed;
  556.  INLINE $2F3C,$0,$106,$7000,$A82A;
  557.  
  558. FUNCTION SGSetSoundInputParameters (c:SGChannel; sampleSize:INTEGER; numChannels:INTEGER;
  559.                         compressionType:OSType ):ComponentResult;
  560.     INLINE $2F3C,$8,$107,$7000,$A82A;
  561. FUNCTION SGGetSoundInputParameters (c:SGChannel; VAR sampleSize:INTEGER; VAR numChannels:INTEGER;
  562.                         VAR compressionType:OSType ):ComponentResult;
  563.     INLINE $2F3C,$C,$108,$7000,$A82A;
  564.  
  565.  
  566.  
  567. CONST
  568. sgChannelAtom = 'chan';
  569.  
  570. sgChannelSettingsAtom ='ctom';
  571. sgChannelDescription ='cdsc';
  572. sgChannelSettings ='cset';
  573.  
  574. sgDeviceNameType ='name';
  575. sgUsageType ='use ';
  576. sgPlayFlagsType ='plyf';
  577. sgClipType ='clip';
  578. sgMatrixType ='mtrx';
  579. sgVolumeType ='volu';
  580.  
  581. sgPanelSettingsAtom ='ptom';
  582. sgPanelDescription ='pdsc';
  583. sgPanelSettings ='pset';
  584.  
  585. sgcSoundCompressionType ='scmp';
  586. sgcSoundSampleRateType ='srat';
  587. sgcSoundChannelCountType ='schn';
  588. sgcSoundSampleSizeType ='ssiz';
  589. sgcSoundInputType ='sinp';
  590. sgcSoundGainType ='gain';
  591.  
  592. sgcVideoHueType ='hue ';
  593. sgcVideoSaturationType ='satr';
  594. sgcVideoContrastType ='trst';
  595. sgcVideoSharpnessType ='shrp';
  596. sgcVideoBrigtnessType ='brit';
  597. sgcVideoBlackLevelType ='blkl';
  598. sgcVideoWhiteLevelType ='whtl';
  599.  
  600. sgcVideoInputType ='vinp';
  601. sgcVideoFormatType ='vstd';
  602. sgcVideoFilterType ='vflt';
  603.  
  604. sgcVideoRectType ='vrct';
  605. sgVideoDigitizerType ='vdig';
  606.  
  607. noDeviceForChannel = -9400;
  608. grabTimeComplete = -9401;
  609. cantDoThatInCurrentMode = -9402;
  610. notEnoughMemoryToGrab = -9403;
  611. notEnoughDiskSpaceToGrab = -9404;
  612. couldntGetRequiredComponent = -9405;
  613. badSGChannel = -9406;
  614. seqGrabInfoNotAvailable = -9407;
  615. deviceCantMeetRequest = -9408;
  616.  
  617.     kSGInitializeSelect = $1;
  618.     kSGSetDataOutputSelect = $2;
  619.     kSGGetDataOutputSelect = $3;
  620.     kSGSetGWorldSelect = $4;
  621.     kSGGetGWorldSelect = $5;
  622.     kSGNewChannelSelect = $6;
  623.     kSGDisposeChannelSelect = $7;
  624.     kSGStartPreviewSelect = $10;
  625.     kSGStartRecordSelect = $11;
  626.     kSGIdleSelect = $12;
  627.     kSGStopSelect = $13;
  628.     kSGPauseSelect = $14;
  629.     kSGPrepareSelect = $15;
  630.     kSGReleaseSelect = $16;
  631.     kSGGetMovieSelect = $17;
  632.     kSGSetMaximumRecordTimeSelect = $18;
  633.     kSGGetMaximumRecordTimeSelect = $19;
  634.     kSGGetStorageSpaceRemainingSelect = $1A;
  635.     kSGGetTimeRemainingSelect = $1B;
  636.     kSGGrabPictSelect = $1C;
  637.     kSGGetLastMovieResIDSelect = $1D;
  638.     kSGSetFlagsSelect = $1E;
  639.     kSGGetFlagsSelect = $1F;
  640.  
  641.     kSGSetDataProcSelect = $20;
  642.     kSGNewChannelFromComponentSelect = $21;
  643.     kSGDisposeDeviceListSelect = $22;
  644.     kSGAppendDeviceListToMenuSelect = $23;
  645.     kSGSetSettingsSelect = $24;
  646.     kSGGetSettingsSelect = $25;
  647.     kSGGetIndChannelSelect = $26;
  648.     kSGUpdateSelect = $27;
  649.     kSGGetPauseSelect = $28;
  650.     kSGSettingsDialogSelect = $29;
  651.     kSGGetAlignmentProcSelect = $2A;
  652.     kSGSetChannelSettingsSelect = $2B;
  653.     kSGGetChannelSettingsSelect = $2C;
  654.     
  655.     kSGWriteMovieDataSelect = $100;
  656.     kSGAddFrameReferenceSelect = $101;
  657.     kSGGetNextFrameReferenceSelect = $102;
  658.     kSGGetTimeBaseSelect = $103;
  659.     kSGSortDeviceListSelect = $104;
  660.     kSGAddMovieDataSelect = $105;
  661.     kSGChangedSourceSelect = $106;
  662.  
  663.     kSGCSetChannelUsageSelect = $80;
  664.     kSGCGetChannelUsageSelect = $81;
  665.     kSGCSetChannelBoundsSelect = $82;
  666.     kSGCGetChannelBoundsSelect = $83;
  667.     kSGCSetChannelVolumeSelect = $84;
  668.     kSGCGetChannelVolumeSelect = $85;
  669.     kSGCGetChannelInfoSelect = $86;
  670.     kSGCSetChannelPlayFlagsSelect = $87;
  671.     kSGCGetChannelPlayFlagsSelect = $88;
  672.     kSGCSetChannelMaxFramesSelect = $89;
  673.     kSGCGetChannelMaxFramesSelect = $8A;
  674.     kSGCSetChannelRefConSelect = $8B;
  675.     kSGCSetChannelClipSelect = $8C;
  676.     kSGCGetChannelClipSelect = $8D;
  677.     kSGCGetChannelSampleDescriptionSelect = $8E;
  678.     kSGCGetChannelDeviceListSelect = $8F;
  679.     kSGCSetChannelDeviceSelect = $90;
  680.     kSGCSetChannelMatrixSelect = $91;
  681.     kSGCGetChannelMatrixSelect = $92;
  682.     kSGCGetChannelTimeScaleSelect = $93;
  683.     
  684.     kSGCInitChannelSelect = $180;
  685.     kSGCWriteSamplesSelect = $181;
  686.     kSGCGetDataRateSelect = $182;
  687.     kSGCAlignChannelRectSelect = $183;
  688.     
  689.     kSGCPanelGetDitlSelect = $200;
  690.     kSGCPanelGetTitleSelect = $201;
  691.     kSGCPanelCanRunSelect = $202;
  692.     kSGCPanelInstallSelect = $203;
  693.     kSGCPanelEventSelect = $204;
  694.     kSGCPanelItemSelect = $205;
  695.     kSGCPanelRemoveSelect = $206;
  696.     kSGCPanelSetGrabberSelect = $207;
  697.     kSGCPanelSetResFileSelect = $208;
  698.     kSGCPanelGetSettingsSelect = $209;
  699.     kSGCPanelSetSettingsSelect = $20A;
  700.     kSGCPanelValidateInputSelect = $20B;
  701.  
  702.  
  703.     kSGCGetSrcVideoBoundsSelect = $100;
  704.     kSGCSetVideoRectSelect = $101;
  705.     kSGCGetVideoRectSelect = $102;
  706.     kSGCGetVideoCompressorTypeSelect = $103;
  707.     kSGCSetVideoCompressorTypeSelect = $104;
  708.     kSGCSetVideoCompressorSelect = $105;
  709.     kSGCGetVideoCompressorSelect = $106;
  710.     kSGCGetVideoDigitizerComponentSelect = $107;
  711.     kSGCSetVideoDigitizerComponentSelect = $108;
  712.     kSGCVideoDigitizerChangedSelect = $109;
  713.     kSGCSetVideoBottlenecksSelect = $10A;
  714.     kSGCGetVideoBottlenecksSelect = $10B;
  715.     kSGCGrabFrameSelect = $10C;
  716.     kSGCGrabFrameCompleteSelect = $10D;
  717.     kSGCDisplayFrameSelect = $10E;
  718.     kSGCCompressFrameSelect = $10F;
  719.     kSGCCompressFrameCompleteSelect = $110;
  720.     kSGCAddFrameSelect = $111;
  721.     kSGCTransferFrameForCompressSelect = $112;
  722.     kSGCSetCompressBufferSelect = $113;
  723.     kSGCGetCompressBufferSelect = $114;
  724.     kSGCGetBufferInfoSelect = $115;
  725.     kSGCSetUseScreenBufferSelect = $116;
  726.     kSGCGetUseScreenBufferSelect = $117;
  727.     kSGCGrabCompressCompleteSelect = $118;
  728.     kSGCDisplayCompressSelect = $119;
  729.     kSGCSetFrameRateSelect = $11A;
  730.     kSGCGetFrameRateSelect = $11B;
  731.  
  732.     kSGCSetSoundInputDriverSelect = $100;
  733.     kSGCGetSoundInputDriverSelect = $101;
  734.     kSGCSoundInputDriverChangedSelect = $102;
  735.     kSGCSetSoundRecordChunkSizeSelect = $103;
  736.     kSGCGetSoundRecordChunkSizeSelect = $104;
  737.     kSGCSetSoundInputRateSelect = $105;
  738.     kSGCGetSoundInputRateSelect = $106;
  739.     kSGCSetSoundInputParametersSelect = $107;
  740.     kSGCGetSoundInputParametersSelect = $108; 
  741.  
  742.  
  743. CONST
  744.  
  745. {
  746.  Video Digitizer Component
  747.  
  748.  
  749.   Standard type for video digitizers }
  750. videoDigitizerComponentType = 'vdig';
  751. vdigInterfaceRev = 2;
  752.  
  753. { Input Format Standards }
  754. ntscIn = 0;                            { ntsc input format }
  755. currentIn = 0;
  756. palIn = 1;                            { pal input format }
  757. secamIn = 2;                        { secam input format }
  758. ntscReallyIn = 3;
  759.  
  760. { Input Formats }
  761. compositeIn = 0;                    { input is composite format }
  762. sVideoIn = 1;                        { input is sVideo format }
  763. rgbComponentIn = 2;                    { input is rgb component format }
  764.  
  765.  
  766. { Video Digitizer PlayThru States }
  767. vdPlayThruOff = 0;
  768. vdPlayThruOn = 1;
  769.  
  770.  
  771. { Input Color Space Modes }
  772. vdDigitizerBW = 0;                    { black and white }
  773. vdDigitizerRGB = 1;                    { rgb color }
  774.  
  775.  
  776. { Phase Lock Loop Modes }
  777. vdBroadcastMode = 0;                { Broadcast / Laser Disk video mode }
  778. vdVTRMode = 1;                        { VCR / Magnetic media mode }
  779.  
  780.  
  781. { Field Select Options }
  782. vdUseAnyField = 0;
  783. vdUseOddField = 1;
  784. vdUseEvenField = 2;
  785.  
  786. { vdig types }
  787. vdTypeBasic = 0;                    { basic, no clipping }
  788. vdTypeAlpha = 1;                    { supports clipping with alpha channel }
  789. vdTypeMask = 2;                        { supports clipping with mask plane }
  790. vdTypeKey = 3;                        { supports clipping with key color(s) }
  791.  
  792.  
  793. { Digitizer Error Codes }
  794. digiUnimpErr = -2201;                { feature unimplemented }
  795. qtParamErr = -2202;                    { bad input parameter ( out of range, etc ) }
  796. matrixErr = -2203;                    { bad matrix, digitizer did nothing }
  797. notExactMatrix = -2204;                { warning of bad matrix, digitizer did its best }
  798. noMoreKeyColors = -2205;            { all key indexes in use }
  799. notExactSize = -2206;                { Can’t do exact size requested }
  800. badDepth = -2207;                    { Can’t digitize into this depth }
  801. noDMA = -2208;                        { Can’t do DMA digitizing ( i.e. can't go to requested dest }
  802. badCallOrder = -2209;                { Usually due to a status call being called prior to being setup first }
  803.  
  804. { Digitizer Input Capability/Current Flags }
  805. digiInDoesNTSC = $1;                { digitizer supports NTSC input format }
  806. digiInDoesPAL = $2;                    { digitizer supports PAL input format }
  807. digiInDoesSECAM = $4;                { digitizer supports SECAM input format }
  808. digiInDoesGenLock = $80;            { digitizer does genlock }
  809.  
  810. digiInDoesComposite = $100;            { digitizer supports composite input type }
  811. digiInDoesSVideo = $200;            { digitizer supports S-Video input type }
  812. digiInDoesComponent = $400;            { digitizer supports component (rgb) input type }
  813. digiInVTR_Broadcast = $800;            { digitizer can differentiate between the two }
  814.  
  815. digiInDoesColor = $1000;            { digitizer supports color }
  816. digiInDoesBW = $2000;                { digitizer supports black & white }
  817.  
  818.  
  819. { Digitizer Input Current Flags (these are valid only during active operating conditions) }
  820. digiInSignalLock = $80000000;        { digitizer detects input signal is locked - this bit = horiz lock || vertical lock }
  821.  
  822.  
  823. { Digitizer Output Capability/Current Flags }
  824. digiOutDoes1 = $1;                    { digitizer supports 1 bit pixels }
  825. digiOutDoes2 = $2;                    { digitizer supports 2 bit pixels }
  826. digiOutDoes4 = $4;                    { digitizer supports 4 bit pixels }
  827. digiOutDoes8 = $8;                    { digitizer supports 8 bit pixels }
  828. digiOutDoes16 = $10;                { digitizer supports 16 bit pixels }
  829. digiOutDoes32 = $20;                { digitizer supports 32 bit pixels }
  830. digiOutDoesDither = $40;            { digitizer dithers in indexed modes }
  831. digiOutDoesStretch = $80;            { digitizer can arbitrarily stretch }
  832. digiOutDoesShrink = $100;            { digitizer can arbitrarily shrink }
  833. digiOutDoesMask = $200;                { digitizer can mask to clipping regions }
  834.  
  835. digiOutDoesDouble = $800;            { digitizer can stretch to exactly double size }
  836. digiOutDoesQuad = $1000;            { digitizer can stretch exactly quadruple size }
  837. digiOutDoesQuarter = $2000;            { digitizer can shrink to exactly quarter size }
  838. digiOutDoesSixteenth = $4000;        { digitizer can shrink to exactly sixteenth size }
  839.  
  840. digiOutDoesRotate = $8000;            { digitizer supports rotate transformations }
  841. digiOutDoesHorizFlip = $10000;        { digitizer supports horizontal flips Sx < 0 }
  842. digiOutDoesVertFlip = $20000;        { digitizer supports vertical flips Sy < 0 }
  843. digiOutDoesSkew = $40000;            { digitizer supports skew (shear, twist) }
  844. digiOutDoesBlend = $80000;
  845. digiOutDoesWarp = $100000;
  846.  
  847. digiOutDoesHW_DMA = $200000;        { digitizer not constrained to local device }
  848. digiOutDoesHWPlayThru = $400000;    { digitizer doesn't need time to play thru }
  849. digiOutDoesILUT = $800000;            { digitizer does inverse LUT for index modes }
  850. digiOutDoesKeyColor = $1000000;        { digitizer does key color functions too }
  851. digiOutDoesAsyncGrabs = $2000000;    { digitizer supports async grabs }
  852. digiOutDoesUnreadableScreenBits = $4000000;    {playthru doesn't generate readable bits on screen}
  853. digiOutDoesCompress    =    $8000000;    { supports alternate output data types }
  854. digiOutDoesCompressOnly =    $10000000;    { can't provide raw frames anywhere }
  855. digiOutDoesPlayThruDuringCompress = $2000000;    { digi can do playthru while providing compressed data }
  856.  
  857. TYPE
  858. VideoDigitizerComponent = ComponentInstance;
  859. VideoDigitizerError = ComponentResult;
  860.  
  861. { Types }
  862. DigitizerInfo = RECORD
  863.  vdigType: INTEGER;
  864.  inputCapabilityFlags: LONGINT;
  865.  outputCapabilityFlags: LONGINT;
  866.  inputCurrentFlags: LONGINT;
  867.  outputCurrentFlags: LONGINT;
  868.  slot: INTEGER;                        { temporary for connection purposes }
  869.  gdh: GDHandle;                        { temporary for digitizers that have preferred screen }
  870.  maskgdh: GDHandle;                    { temporary for digitizers that have mask planes }
  871.  minDestHeight: INTEGER;            { Smallest resizable height }
  872.  minDestWidth: INTEGER;                { Smallest resizable width }
  873.  maxDestHeight: INTEGER;            { Largest resizable height }
  874.  maxDestWidth: INTEGER;                { Largest resizable height }
  875.  blendLevels: INTEGER;                { Number of blend levels supported (2 if 1 bit mask) }
  876.  Private: LONGINT;                    { reserved }
  877.  END;
  878.  
  879. VdigType = RECORD
  880.  digType: LONGINT;
  881.  Private: LONGINT;
  882.  END;
  883.  
  884. VdigTypeListPtr = ^VdigTypeList;
  885. VdigTypeListHandle = ^VdigTypeListPtr;
  886. VdigTypeList = RECORD
  887.  count: INTEGER;
  888.  list: ARRAY [0..0] OF VdigType;
  889.  END;
  890.  
  891. VdigBufferRec = RECORD
  892.     dest: PixMapHandle;
  893.     location: Point;
  894.     reserved: LONGINT;
  895.     END;
  896.  
  897. VdigBufferRecListPtr = ^VdigBufferRecList;
  898. VdigBufferRecListHandle = ^VdigBufferRecListPtr;
  899. VdigBufferRecList = RECORD
  900.     count: INTEGER;
  901.     matrix: MatrixRecordPtr ;
  902.     mask: RgnHandle;
  903.     list: ARRAY [0..0] OF VdigBufferRec;
  904.     END;
  905.     
  906. VdigIntProc = ProcPtr;
  907.  
  908. VDCompressionListPtr = ^VDCompressionList;
  909. VDCompressionListHandle = ^VDCompressionListPtr;
  910. VDCompressionList = RECORD
  911.     codec    :    CodecComponent;
  912.     cType    :    CodecType;
  913.     typeName :    Str63;
  914.     name    :    Str63;
  915.     formatFlags : LONGINT;
  916.     compressFlags : LONGINT;
  917.     reserved         :    LONGINT;
  918. END; 
  919.  
  920.  
  921. CONST
  922.  
  923. dmaDepth1 = 1;
  924. dmaDepth2 = 2;
  925. dmaDepth4 = 4;
  926. dmaDepth8 = 8;
  927. dmaDepth16 = $10;
  928. dmaDepth32 = $20;
  929. dmaDepth2Gray = $40;
  930. dmaDepth4Gray = $80;
  931. dmaDepth8Gray = $100;
  932.  
  933. kvdigSelectors = $52;
  934.  
  935. FUNCTION VDGetMaxSrcRect(ci: VideoDigitizerComponent;inputStd: INTEGER;VAR maxSrcRect: Rect): VideoDigitizerError;
  936.  INLINE $2F3C,$6,$1,$7000,$A82A;
  937. FUNCTION VDGetActiveSrcRect(ci: VideoDigitizerComponent;inputStd: INTEGER;VAR activeSrcRect: Rect): VideoDigitizerError;
  938.  INLINE $2F3C,$6,$2,$7000,$A82A;
  939. FUNCTION VDSetDigitizerRect(ci: VideoDigitizerComponent;VAR digitizerRect: Rect): VideoDigitizerError;
  940.  INLINE $2F3C,$4,$3,$7000,$A82A;
  941. FUNCTION VDGetDigitizerRect(ci: VideoDigitizerComponent;VAR digitizerRect: Rect): VideoDigitizerError;
  942.  INLINE $2F3C,$4,$4,$7000,$A82A;
  943. FUNCTION VDGetVBlankRect(ci: VideoDigitizerComponent;inputStd: INTEGER;VAR vBlankRect: Rect): VideoDigitizerError;
  944.  INLINE $2F3C,$6,$5,$7000,$A82A;
  945. FUNCTION VDGetMaskPixMap(ci: VideoDigitizerComponent;maskPixMap: PixMapHandle): VideoDigitizerError;
  946.  INLINE $2F3C,$4,$6,$7000,$A82A;
  947. FUNCTION VDGetPlayThruDestination(ci: VideoDigitizerComponent;VAR dest: PixMapHandle;
  948.  VAR destRect: Rect;VAR m: MatrixRecord;VAR mask: RgnHandle): VideoDigitizerError;
  949.  INLINE $2F3C,$10,$8,$7000,$A82A;
  950. FUNCTION VDUseThisCLUT(ci: VideoDigitizerComponent;colorTableHandle: CTabHandle): VideoDigitizerError;
  951.  INLINE $2F3C,$4,$9,$7000,$A82A;
  952. FUNCTION VDSetInputGammaValue(ci: VideoDigitizerComponent;channel1: Fixed;channel2: Fixed;
  953.  channel3: Fixed): VideoDigitizerError;
  954.  INLINE $2F3C,$C,$A,$7000,$A82A;
  955. FUNCTION VDGetInputGammaValue(ci: VideoDigitizerComponent;VAR channel1: Fixed;
  956.  VAR channel2: Fixed;VAR channel3: Fixed): VideoDigitizerError;
  957.  INLINE $2F3C,$C,$B,$7000,$A82A;
  958. FUNCTION VDSetBrightness(ci: VideoDigitizerComponent;VAR brightness: INTEGER): VideoDigitizerError;
  959.  INLINE $2F3C,$4,$C,$7000,$A82A;
  960. FUNCTION VDGetBrightness(ci: VideoDigitizerComponent;VAR brightness: INTEGER): VideoDigitizerError;
  961.  INLINE $2F3C,$4,$D,$7000,$A82A;
  962. FUNCTION VDSetContrast(ci: VideoDigitizerComponent;VAR contrast: INTEGER): VideoDigitizerError;
  963.  INLINE $2F3C,$4,$E,$7000,$A82A;
  964. FUNCTION VDSetHue(ci: VideoDigitizerComponent;VAR hue: INTEGER): VideoDigitizerError;
  965.  INLINE $2F3C,$4,$F,$7000,$A82A;
  966. FUNCTION VDSetSharpness(ci: VideoDigitizerComponent;VAR sharpness: INTEGER): VideoDigitizerError;
  967.  INLINE $2F3C,$4,$10,$7000,$A82A;
  968. FUNCTION VDSetSaturation(ci: VideoDigitizerComponent;VAR saturation: INTEGER): VideoDigitizerError;
  969.  INLINE $2F3C,$4,$11,$7000,$A82A;
  970. FUNCTION VDGetContrast(ci: VideoDigitizerComponent;VAR contrast: INTEGER): VideoDigitizerError;
  971.  INLINE $2F3C,$4,$12,$7000,$A82A;
  972. FUNCTION VDGetHue(ci: VideoDigitizerComponent;VAR hue: INTEGER): VideoDigitizerError;
  973.  INLINE $2F3C,$4,$13,$7000,$A82A;
  974. FUNCTION VDGetSharpness(ci: VideoDigitizerComponent;VAR sharpness: INTEGER): VideoDigitizerError;
  975.  INLINE $2F3C,$4,$14,$7000,$A82A;
  976. FUNCTION VDGetSaturation(ci: VideoDigitizerComponent;VAR saturation: INTEGER): VideoDigitizerError;
  977.  INLINE $2F3C,$4,$15,$7000,$A82A;
  978. FUNCTION VDGrabOneFrame(ci: VideoDigitizerComponent): VideoDigitizerError;
  979.  INLINE $2F3C,$0,$16,$7000,$A82A;
  980. FUNCTION VDGetMaxAuxBuffer(ci: VideoDigitizerComponent;VAR pm: PixMapHandle;
  981.  VAR r: Rect): VideoDigitizerError;
  982.  INLINE $2F3C,$8,$17,$7000,$A82A;
  983. FUNCTION VDGetDigitizerInfo(ci: VideoDigitizerComponent;VAR info: DigitizerInfo): VideoDigitizerError;
  984.  INLINE $2F3C,$4,$19,$7000,$A82A;
  985. FUNCTION VDGetCurrentFlags(ci: VideoDigitizerComponent;VAR inputCurrentFlag: LONGINT;
  986.  VAR outputCurrentFlag: LONGINT): VideoDigitizerError;
  987.  INLINE $2F3C,$8,$1A,$7000,$A82A;
  988. FUNCTION VDSetKeyColor(ci: VideoDigitizerComponent;index: LONGINT): VideoDigitizerError;
  989.  INLINE $2F3C,$4,$1B,$7000,$A82A;
  990. FUNCTION VDGetKeyColor(ci: VideoDigitizerComponent;VAR index: LONGINT): VideoDigitizerError;
  991.  INLINE $2F3C,$4,$1C,$7000,$A82A;
  992. FUNCTION VDAddKeyColor(ci: VideoDigitizerComponent;VAR index: LONGINT): VideoDigitizerError;
  993.  INLINE $2F3C,$4,$1D,$7000,$A82A;
  994. FUNCTION VDGetNextKeyColor(ci: VideoDigitizerComponent;index: LONGINT): VideoDigitizerError;
  995.  INLINE $2F3C,$4,$1E,$7000,$A82A;
  996. FUNCTION VDSetKeyColorRange(ci: VideoDigitizerComponent;VAR minRGB: RGBColor;
  997.  VAR maxRGB: RGBColor): VideoDigitizerError;
  998.  INLINE $2F3C,$8,$1F,$7000,$A82A;
  999. FUNCTION VDGetKeyColorRange(ci: VideoDigitizerComponent;VAR minRGB: RGBColor;
  1000.  VAR maxRGB: RGBColor): VideoDigitizerError;
  1001.  INLINE $2F3C,$8,$20,$7000,$A82A;
  1002. FUNCTION VDSetDigitizerUserInterrupt(ci: VideoDigitizerComponent;flags: LONGINT;
  1003.  userInterruptProc: VdigIntProc;refcon: LONGINT): VideoDigitizerError;
  1004.  INLINE $2F3C,$C,$21,$7000,$A82A;
  1005. FUNCTION VDSetInputColorSpaceMode(ci: VideoDigitizerComponent;colorSpaceMode: INTEGER): VideoDigitizerError;
  1006.  INLINE $2F3C,$2,$22,$7000,$A82A;
  1007. FUNCTION VDGetInputColorSpaceMode(ci: VideoDigitizerComponent;VAR colorSpaceMode: INTEGER): VideoDigitizerError;
  1008.  INLINE $2F3C,$4,$23,$7000,$A82A;
  1009. FUNCTION VDSetClipState(ci: VideoDigitizerComponent;clipEnable: INTEGER): VideoDigitizerError;
  1010.  INLINE $2F3C,$2,$24,$7000,$A82A;
  1011. FUNCTION VDGetClipState(ci: VideoDigitizerComponent;VAR clipEnable: INTEGER): VideoDigitizerError;
  1012.  INLINE $2F3C,$4,$25,$7000,$A82A;
  1013. FUNCTION VDSetClipRgn(ci: VideoDigitizerComponent;clipRegion: RgnHandle): VideoDigitizerError;
  1014.  INLINE $2F3C,$4,$26,$7000,$A82A;
  1015. FUNCTION VDClearClipRgn(ci: VideoDigitizerComponent;clipRegion: RgnHandle): VideoDigitizerError;
  1016.  INLINE $2F3C,$4,$27,$7000,$A82A;
  1017. FUNCTION VDGetCLUTInUse(ci: VideoDigitizerComponent;VAR colorTableHandle: CTabHandle): VideoDigitizerError;
  1018.  INLINE $2F3C,$4,$28,$7000,$A82A;
  1019. FUNCTION VDSetPLLFilterType(ci: VideoDigitizerComponent;pllType: INTEGER): VideoDigitizerError;
  1020.  INLINE $2F3C,$2,$29,$7000,$A82A;
  1021. FUNCTION VDGetPLLFilterType(ci: VideoDigitizerComponent;VAR pllType: INTEGER): VideoDigitizerError;
  1022.  INLINE $2F3C,$4,$2A,$7000,$A82A;
  1023. FUNCTION VDGetMaskandValue(ci: VideoDigitizerComponent;blendLevel: INTEGER;
  1024.  VAR mask: LONGINT;VAR value: LONGINT): VideoDigitizerError;
  1025.  INLINE $2F3C,$A,$2B,$7000,$A82A;
  1026. FUNCTION VDSetMasterBlendLevel(ci: VideoDigitizerComponent;VAR blendLevel: INTEGER): VideoDigitizerError;
  1027.  INLINE $2F3C,$4,$2C,$7000,$A82A;
  1028. FUNCTION VDSetPlayThruDestination(ci: VideoDigitizerComponent;dest: PixMapHandle;
  1029.  VAR destRect: Rect;VAR m: MatrixRecord;mask: RgnHandle): VideoDigitizerError;
  1030.  INLINE $2F3C,$10,$2D,$7000,$A82A;
  1031. FUNCTION VDSetPlayThruOnOff(ci: VideoDigitizerComponent;state: INTEGER): VideoDigitizerError;
  1032.  INLINE $2F3C,$2,$2E,$7000,$A82A;
  1033. FUNCTION VDSetFieldPreference(ci: VideoDigitizerComponent;fieldFlag: INTEGER): VideoDigitizerError;
  1034.  INLINE $2F3C,$2,$2F,$7000,$A82A;
  1035. FUNCTION VDGetFieldPreference(ci: VideoDigitizerComponent;VAR fieldFlag: INTEGER): VideoDigitizerError;
  1036.  INLINE $2F3C,$4,$30,$7000,$A82A;
  1037. FUNCTION VDPreflightDestination(ci: VideoDigitizerComponent;VAR digitizerRect: Rect;
  1038.  dest: PixMapHandle;VAR destRect: Rect;VAR m: MatrixRecord): VideoDigitizerError;
  1039.  INLINE $2F3C,$10,$32,$7000,$A82A;
  1040. FUNCTION VDPreflightGlobalRect(ci: VideoDigitizerComponent;theWindow: GrafPtr;
  1041.  VAR globalRect: Rect): VideoDigitizerError;
  1042.  INLINE $2F3C,$8,$33,$7000,$A82A;
  1043. FUNCTION VDSetPlayThruGlobalRect(ci: VideoDigitizerComponent;theWindow: GrafPtr;
  1044.  VAR globalRect: Rect): VideoDigitizerError;
  1045.  INLINE $2F3C,$8,$34,$7000,$A82A;
  1046. FUNCTION VDSetInputGammaRecord(ci: VideoDigitizerComponent;inputGammaPtr: VDGamRecPtr): VideoDigitizerError;
  1047.  INLINE $2F3C,$4,$35,$7000,$A82A;
  1048. FUNCTION VDGetInputGammaRecord(ci: VideoDigitizerComponent;VAR inputGammaPtr: VDGamRecPtr): VideoDigitizerError;
  1049.  INLINE $2F3C,$4,$36,$7000,$A82A;
  1050. FUNCTION VDSetBlackLevelValue(ci: VideoDigitizerComponent;VAR blackLevel: INTEGER): VideoDigitizerError;
  1051.  INLINE $2F3C,$4,$37,$7000,$A82A;
  1052. FUNCTION VDGetBlackLevelValue(ci: VideoDigitizerComponent;VAR blackLevel: INTEGER): VideoDigitizerError;
  1053.  INLINE $2F3C,$4,$38,$7000,$A82A;
  1054. FUNCTION VDSetWhiteLevelValue(ci: VideoDigitizerComponent;VAR whiteLevel: INTEGER): VideoDigitizerError;
  1055.  INLINE $2F3C,$4,$39,$7000,$A82A;
  1056. FUNCTION VDGetWhiteLevelValue(ci: VideoDigitizerComponent;VAR whiteLevel: INTEGER): VideoDigitizerError;
  1057.  INLINE $2F3C,$4,$3A,$7000,$A82A;
  1058. FUNCTION VDGetVideoDefaults(ci: VideoDigitizerComponent;VAR blackLevel: INTEGER;
  1059.  VAR whiteLevel: INTEGER;VAR brightness: INTEGER;VAR hue: INTEGER;VAR saturation: INTEGER;
  1060.  VAR contrast: INTEGER;VAR sharpness: INTEGER): VideoDigitizerError;
  1061.  INLINE $2F3C,$1C,$3B,$7000,$A82A;
  1062. FUNCTION VDGetNumberOfInputs(ci: VideoDigitizerComponent;VAR inputs: INTEGER): VideoDigitizerError;
  1063.  INLINE $2F3C,$4,$3C,$7000,$A82A;
  1064. FUNCTION VDGetInputFormat(ci: VideoDigitizerComponent;input: INTEGER;VAR format: INTEGER): VideoDigitizerError;
  1065.  INLINE $2F3C,$6,$3D,$7000,$A82A;
  1066. FUNCTION VDSetInput(ci: VideoDigitizerComponent;input: INTEGER): VideoDigitizerError;
  1067.  INLINE $2F3C,$2,$3E,$7000,$A82A;
  1068. FUNCTION VDGetInput(ci: VideoDigitizerComponent;VAR input: INTEGER): VideoDigitizerError;
  1069.  INLINE $2F3C,$4,$3F,$7000,$A82A;
  1070. FUNCTION VDSetInputStandard(ci: VideoDigitizerComponent;inputStandard: INTEGER): VideoDigitizerError;
  1071.  INLINE $2F3C,$2,$40,$7000,$A82A;
  1072. FUNCTION     VDSetupBuffers(ci: VideoDigitizerComponent; bufferList: VdigBufferRecListHandle ) : VideoDigitizerError;
  1073.  INLINE $2F3C,$4,$41,$7000,$A82A;
  1074. FUNCTION     VDGrabOneFrameAsync(ci: VideoDigitizerComponent; buffer : INTEGER) : VideoDigitizerError;
  1075.  INLINE $2F3C,$2,$42,$7000,$A82A;
  1076. FUNCTION     VDDone(ci: VideoDigitizerComponent; buffer : INTEGER) : LONGINT;
  1077.  INLINE $2F3C,$2,$43,$7000,$A82A;
  1078. FUNCTION VDSetCompression(ci:VideoDigitizerComponent; compressType:OSType; depth:INTEGER; VAR bounds:Rect;
  1079.             spatialQuality:CodecQ; temporalQuality:CodecQ; keyFrameRate:LONGINT ) :VideoDigitizerError;
  1080.  INLINE $2F3C,$16,$44,$7000,$A82A;
  1081.  
  1082. FUNCTION VDCompressOneFrameAsync(ci:VideoDigitizerComponent ):VideoDigitizerError;
  1083.  INLINE $2F3C,0,$45,$7000,$A82A;
  1084.  
  1085. { See CompressSequenceFrame in ImageCompression.p for the reason behind this massive glue }
  1086. FUNCTION VDCompressDone(ci:VideoDigitizerComponent; VAR done :BOOLEAN; VAR theData:Ptr; VAR dataSize:LONGINT; 
  1087.     VAR similarity:Byte; VAR t:TimeRecord):VideoDigitizerError;
  1088.  INLINE $206F,$0004,$4250,$52AF,$0004,$2F3C,$14,$46,$7000,$A82A;
  1089.  
  1090. FUNCTION VDReleaseCompressBuffer(ci:VideoDigitizerComponent; bufferAddr:Ptr ):VideoDigitizerError;
  1091.  INLINE $2F3C,$4,$47,$7000,$A82A;
  1092.  
  1093. FUNCTION VDGetImageDescription(ci:VideoDigitizerComponent; desc:ImageDescriptionHandle):VideoDigitizerError;
  1094.  INLINE $2F3C,$4,$48,$7000,$A82A;
  1095.  
  1096. FUNCTION VDResetCompressSequence(ci:VideoDigitizerComponent ):VideoDigitizerError;
  1097.  INLINE $2F3C,0,$49,$7000,$A82A;
  1098.  
  1099. FUNCTION VDSetCompressionOnOff(ci:VideoDigitizerComponent; state:BOOLEAN ):VideoDigitizerError; 
  1100.  INLINE $2F3C,$2,$4A,$7000,$A82A;
  1101.  
  1102. FUNCTION VDGetCompressionTypes(ci:VideoDigitizerComponent; h:VDCompressionListHandle ):VideoDigitizerError; 
  1103.  INLINE $2F3C,$4,$4B,$7000,$A82A;
  1104.  
  1105. FUNCTION VDSetTimeBase(ci:VideoDigitizerComponent; t:TimeBase ):VideoDigitizerError; 
  1106.  INLINE $2F3C,$4,$4C,$7000,$A82A;
  1107.  
  1108. FUNCTION VDSetFrameRate(ci:VideoDigitizerComponent; framesPerSecond:Fixed ):VideoDigitizerError; 
  1109.  INLINE $2F3C,$4,$4D,$7000,$A82A;
  1110.  
  1111. FUNCTION VDGetDataRate(ci:VideoDigitizerComponent; VAR milliSecPerFrame: LONGINT; VAR framesPerSecond:Fixed; VAR bytesPerSecond:LONGINT):VideoDigitizerError;
  1112.  INLINE $2F3C,$C,$4E,$7000,$A82A;
  1113.  
  1114. FUNCTION VDGetSoundInputDriver(ci:VideoDigitizerComponent; soundDriverName:Str255 ):VideoDigitizerError;
  1115.  INLINE $2F3C,$4,$4F,$7000,$A82A;
  1116.  
  1117. FUNCTION VDGetDMADepths(ci:VideoDigitizerComponent; VAR depthArray:LONGINT; VAR preferredDepth:LONGINT):VideoDigitizerError;
  1118.  INLINE $2F3C,$8,$50,$7000,$A82A;
  1119.  
  1120. FUNCTION VDGetPreferredTimeScale(ci:VideoDigitizerComponent; VAR preferred:TimeScale):VideoDigitizerError;
  1121.  INLINE $2F3C,$4,$51,$7000,$A82A;
  1122.  
  1123. FUNCTION VDReleaseAsyncBuffers(ci:VideoDigitizerComponent):VideoDigitizerError;
  1124.  INLINE $2F3C,0,$52,$7000,$A82A;
  1125.  
  1126. CONST
  1127. { Video Digitizer Interface }
  1128. kSelectVDGetMaxSrcRect = $1;
  1129. kSelectVDGetActiveSrcRect = $2;
  1130. kSelectVDSetDigitizerRect = $3;
  1131. kSelectVDGetDigitizerRect = $4;
  1132. kSelectVDGetVBlankRect = $5;
  1133. kSelectVDGetMaskPixMap = $6;
  1134. kSelectVDGetPlayThruDestination = $8;
  1135. kSelectVDUseThisCLUT = $9;
  1136. kSelectVDSetInputGammaValue = $A;
  1137. kSelectVDGetInputGammaValue = $B;
  1138. kSelectVDSetBrightness = $C;
  1139. kSelectVDGetBrightness = $D;
  1140. kSelectVDSetContrast = $E;
  1141. kSelectVDSetHue = $F;
  1142. kSelectVDSetSharpness = $10;
  1143. kSelectVDSetSaturation = $11;
  1144. kSelectVDGetContrast = $12;
  1145. kSelectVDGetHue = $13;
  1146. kSelectVDGetSharpness = $14;
  1147. kSelectVDGetSaturation = $15;
  1148. kSelectVDGrabOneFrame = $16;
  1149. kSelectVDGetMaxAuxBuffer = $17;
  1150. kSelectVDGetDigitizerInfo = $19;
  1151. kSelectVDGetCurrentFlags = $1A;
  1152. kSelectVDSetKeyColor = $1B;
  1153. kSelectVDGetKeyColor = $1C;
  1154. kSelectVDAddKeyColor = $1D;
  1155. kSelectVDGetNextKeyColor = $1E;
  1156. kSelectVDSetKeyColorRange = $1F;
  1157. kSelectVDGetKeyColorRange = $20;
  1158. kSelectVDSetDigitizerUserInterrupt = $21;
  1159. kSelectVDSetInputColorSpaceMode = $22;
  1160. kSelectVDGetInputColorSpaceMode = $23;
  1161. kSelectVDSetClipState = $24;
  1162. kSelectVDGetClipState = $25;
  1163. kSelectVDSetClipRgn = $26;
  1164. kSelectVDClearClipRgn = $27;
  1165. kSelectVDGetCLUTInUse = $28;
  1166. kSelectVDSetPLLFilterType = $29;
  1167. kSelectVDGetPLLFilterType = $2A;
  1168. kSelectVDGetMaskandValue = $2B;
  1169. kSelectVDSetMasterBlendLevel = $2C;
  1170. kSelectVDSetPlayThruDestination = $2D;
  1171. kSelectVDSetPlayThruOnOff = $2E;
  1172. kSelectVDSetFieldPreference = $2F;
  1173. kSelectVDGetFieldPreference = $30;
  1174. kSelectVDPreflightDestination = $32;
  1175. kSelectVDPreflightGlobalRect = $33;
  1176. kSelectVDSetPlayThruGlobalRect = $34;
  1177. kSelectVDSetInputGammaRecord = $35;
  1178. kSelectVDGetInputGammaRecord = $36;
  1179. kSelectVDSetBlackLevelValue = $37;
  1180. kSelectVDGetBlackLevelValue = $38;
  1181. kSelectVDSetWhiteLevelValue = $39;
  1182. kSelectVDGetWhiteLevelValue = $3A;
  1183. kSelectVDGetVideoDefaults = $3B;
  1184. kSelectVDGetNumberOfInputs = $3C;
  1185. kSelectVDGetInputFormat = $3D;
  1186. kSelectVDSetInput = $3E;
  1187. kSelectVDGetInput = $3F;
  1188. kSelectVDSetInputStandard = $40;
  1189. kSelectVDSetupBuffers = $41;
  1190. kSelectVDGrabOneFrameAsync = $42;
  1191. kSelectVDDone = $43;
  1192. kSelectVDSetCompression = $44;
  1193. kSelectVDCompressOneFrameAsync = $45;
  1194. kSelectVDCompressDone = $46;
  1195. kSelectVDReleaseCompressBuffer = $47;
  1196. kSelectVDGetImageDescription = $48;
  1197. kSelectVDResetCompressSequence = $49;
  1198. kSelectVDSetCompressionOnOff = $4A;
  1199. kSelectVDGetCompressionTypes = $4B;
  1200. kSelectVDSetTimeBase = $4C;
  1201. kSelectVDSetFrameRate = $4D;
  1202. kSelectVDGetDataRate = $4E;
  1203. kSelectVDGetSoundInputDriver = $4F;
  1204. kSelectVDGetDMADepths = $50;
  1205. kSelectVDGetPreferredTimeScale = $51;
  1206. kSelectVDReleaseAsyncBuffers = $52;
  1207.  
  1208.  
  1209. CONST
  1210. StandardCompressionType    =    'scdi';
  1211. StandardCompressionSubType =    'imag';
  1212.  
  1213. TYPE
  1214. SCModalFilterProcPtr = ProcPtr;
  1215. SCModalHookProcPtr = ProcPtr;
  1216.  
  1217.  
  1218. CONST
  1219.     scListEveryCodec = $2;
  1220.     scAllowZeroFrameRate = $4;
  1221.     scAllowZeroKeyFrameRate = $8;
  1222.     scShowBestDepth = $10;
  1223.     scUseMovableModal = $20;
  1224.  
  1225.     scPreferCropping = 1;
  1226.     scPreferScaling = 2;
  1227.     scPreferScalingAndCropping = 3;
  1228.  
  1229.     scTestImageWidth = 80;
  1230.     scTestImageHeight = 80;
  1231.  
  1232.     scOKItem = 1;
  1233.     scCancelItem = 2;
  1234.     scCustomItem = 3;
  1235.  
  1236.     scUserCancelled    =    1;
  1237.     
  1238.     
  1239. TYPE
  1240.  
  1241. SCSpatialSettings = RECORD 
  1242.     cType             : CodecType;
  1243.     codec             : CodecComponent;
  1244.     depth             : INTEGER;
  1245.     spatialQuality     : CodecQ;
  1246. END;
  1247.  
  1248. SCTemporalSettings = RECORD
  1249.     temporalQuality : CodecQ;
  1250.     frameRate         : Fixed;
  1251.     keyFrameRate    : LONGINT;
  1252. END;
  1253.  
  1254.  
  1255. SCDataRateSettings = RECORD 
  1256.     dataRate            :LONGINT;
  1257.     frameDuration        :LONGINT;
  1258.     minSpatialQuality    :CodecQ;
  1259.     minTemporalQuality    :CodecQ;
  1260. END;
  1261.  
  1262. SCExtendedProcs = RECORD 
  1263.     filterProc    :SCModalFilterProcPtr;
  1264.     hookProc    :SCModalHookProcPtr;
  1265.     refCon        :LONGINT;
  1266.     customName    :Str31;
  1267. END; 
  1268.  
  1269. CONST
  1270.     
  1271.     scSpatialSettingsType    =    'sptl';        {    pointer to SCSpatialSettings struct    }    
  1272.     scTemporalSettingsType    =    'tprl';        { pointer to SCTemporalSettings struct    }
  1273.     scDataRateSettingsType    =    'drat';        { pointer to SCDataRateSettings struct    }
  1274.     scColorTableType        =    'clut';            {    Pointer to CTabHandle    }
  1275.     scProgressProcType        =    'prog';        { pointer to ProgressRecord struct    }
  1276.     scExtendedProcsType        =    'xprc';        {    pointer to SCExtendedProcs struct    }
  1277.     scPreferenceFlagsType    =    'pref';    {    pointer to long    }
  1278.     scSettingsStateType        =    'ssta';        {    pointer to Handle    }
  1279.     scSequenceIDType        =    'sequ';            {    pointer to ImageSequence    }
  1280.     scWindowPositionType    =    'wndw';    {    pointer to Point    }
  1281.     scCodecFlagsType        =    'cflg';            {    pointer to CodecFlags    }
  1282.     
  1283.     scInfoNotFoundErr    =    -8971;
  1284.  
  1285.  
  1286. FUNCTION SCPositionRect(ci:ComponentInstance;r:RectPtr;VAR where:Point): ComponentResult;
  1287.  INLINE $2F3C,$8,$2,$7000,$A82A;
  1288. FUNCTION SCPositionDialog(ci:ComponentInstance;id:INTEGER;VAR where:Point): ComponentResult;
  1289.  INLINE $2F3C,$6,$3,$7000,$A82A;
  1290. FUNCTION SCSetTestImagePictHandle(ci:ComponentInstance;testPict:PicHandle;testRect:RectPtr;testFlags:INTEGER): ComponentResult;
  1291.  INLINE $2F3C,$A,$4,$7000,$A82A;
  1292. FUNCTION SCSetTestImagePictFile(ci:ComponentInstance;testFileRef:INTEGER;testRect:RectPtr;testFlags:INTEGER): ComponentResult;
  1293.  INLINE $2F3C,$8,$5,$7000,$A82A;
  1294. FUNCTION SCSetTestImagePixMap(ci:ComponentInstance;testPixMap:PixMapHandle;testRect:RectPtr;testFlags:INTEGER): ComponentResult;
  1295.  INLINE $2F3C,$A,$6,$7000,$A82A;
  1296. FUNCTION SCGetBestDeviceRect(ci:ComponentInstance;r:RectPtr): ComponentResult;
  1297.  INLINE $2F3C,$4,$7,$7000,$A82A;
  1298. FUNCTION SCRequestImageSettings(ci:ComponentInstance): ComponentResult;
  1299.  INLINE $2F3C,$0,$A,$7000,$A82A;
  1300. FUNCTION SCCompressImage(ci:ComponentInstance;src:PixMapHandle;srcRect:Rect;VAR desc:ImageDescriptionHandle; VAR data:Handle): ComponentResult;
  1301.  INLINE $2F3C,$10,$B,$7000,$A82A;
  1302. FUNCTION SCCompressPicture(ci:ComponentInstance;src,dst:PicHandle): ComponentResult;
  1303.  INLINE $2F3C,$8,$C,$7000,$A82A;
  1304. FUNCTION SCCompressPictureFile(ci:ComponentInstance;srcRef,dstRef:INTEGER): ComponentResult;
  1305.  INLINE $2F3C,$4,$D,$7000,$A82A;
  1306. FUNCTION SCRequestSequenceSettings(ci:ComponentInstance): ComponentResult;
  1307.  INLINE $2F3C,$0,$E,$7000,$A82A;
  1308. FUNCTION SCCompressSequenceBegin(ci:ComponentInstance;src:PixMapHandle;srcRect:Rect;VAR desc:ImageDescriptionHandle): ComponentResult;
  1309.  INLINE $2F3C,$C,$F,$7000,$A82A;
  1310. FUNCTION SCCompressSequenceFrame(ci:ComponentInstance;src:PixMapHandle;srcRect:Rect;VAR data:Handle;VAR dataSize:LONGINT; VAR notSyncFlag: BOOLEAN): ComponentResult;
  1311.  INLINE $2F3C,$14,$10,$7000,$A82A;
  1312. FUNCTION SCCompressSequenceEnd(ci:ComponentInstance): ComponentResult;
  1313.  INLINE $2F3C,$0,$11,$7000,$A82A;
  1314. FUNCTION SCDefaultPictHandleSettings(ci:ComponentInstance;src:PicHandle;motion:BOOLEAN): ComponentResult;
  1315.  INLINE $2F3C,$6,$12,$7000,$A82A;
  1316. FUNCTION SCDefaultPictFileSettings(ci:ComponentInstance;srcRef:INTEGER;motion:BOOLEAN): ComponentResult;
  1317.  INLINE $2F3C,$4,$13,$7000,$A82A;
  1318. FUNCTION SCDefaultPixMapSettings(ci:ComponentInstance;src:PixMapHandle;motion:BOOLEAN): ComponentResult;
  1319.  INLINE $2F3C,$4,$14,$7000,$A82A;
  1320. FUNCTION SCGetInfo(ci:ComponentInstance;infoType:OSType;info:Ptr): ComponentResult;
  1321.  INLINE $2F3C,$8,$15,$7000,$A82A;
  1322. FUNCTION SCSetInfo(ci:ComponentInstance;infoType:OSType;info:Ptr): ComponentResult;
  1323.  INLINE $2F3C,$8,$16,$7000,$A82A;
  1324. FUNCTION SCNewGWorld(ci:ComponentInstance; VAR gwp:GWorldPtr; VAR rp:Rect; flags: GWorldFlags):ComponentResult;
  1325.  INLINE $2F3C,$C,$17,$7000,$A82A;
  1326.  
  1327. CONST
  1328.     
  1329.     kScPositionRect            =    2;
  1330.     kScPositionDialog        =    3;
  1331.     kScSetTestImagePictHandle=    4;
  1332.     kScSetTestImagePictFile    =    5;
  1333.     kScSetTestImagePixMap    =    6;
  1334.     kScGetBestDeviceRect        =    7;
  1335.  
  1336.     kScRequestImageSettings    =    $A;
  1337.     kScCompressImage            =    $B;
  1338.     kScCompressPicture        =    $C;
  1339.     kScCompressPictureFile    =    $D;
  1340.     kScRequestSequenceSettings=    $E;
  1341.     kScCompressSequenceBegin    =    $F;
  1342.     kScCompressSequenceFrame    =    $10;
  1343.     kScCompressSequenceEnd    =    $11;
  1344.     kScDefaultPictHandleSettings=    $12;
  1345.     kScDefaultPictFileSettings=    $13;
  1346.     kScDefaultPixMapSettings    =    $14;
  1347.     kScGetInfo                =    $15;
  1348.     kScSetInfo                =    $16;
  1349.     kScNewGWorld                =    $17;
  1350.  
  1351. { For compatibility }
  1352. TYPE
  1353. SCParams = RECORD
  1354.     flags        :    LONGINT;
  1355.     theCodecType:    CodecType;
  1356.     theCodec    :    CodecComponent;
  1357.     spatialQuality : CodecQ;
  1358.     temporalQuality : CodecQ;
  1359.     depth            : INTEGER;
  1360.     frameRate        : Fixed;
  1361.     keyFrameRate    : LONGINT;
  1362.     reserved1        : LONGINT;
  1363.     reserved2        :    LONGINT;
  1364. END; 
  1365.  
  1366. CONST
  1367.     kScShowMotionSettings = 1;
  1368.     kScGetCompression = 1;
  1369.     kScSettingsChangedItem = -1;
  1370.     
  1371. FUNCTION OpenStdCompression : ComponentInstance;
  1372. FUNCTION SCGetCompressionExtended(ci:ComponentInstance;VAR sparams:SCParams;where:Point;
  1373.  filterProc:SCModalFilterProcPtr;hookProc:SCModalHookProcPtr;refcon:LONGINT;customName:Str255): ComponentResult;
  1374.  INLINE $2F3C,$18,$1,$7000,$A82A;
  1375. FUNCTION SCGetCompression(ci:ComponentInstance;VAR sparams:SCParams;where:Point): ComponentResult;
  1376.  INLINE $42A7,$42A7,$42A7,$42A7,$2F3C,$18,$1,$7000,$A82A;
  1377.  
  1378.  
  1379. {
  1380.  
  1381.         Movie Import Components
  1382.  
  1383. }
  1384.  
  1385.  
  1386. TYPE
  1387.     MovieImportComponent = ComponentInstance;
  1388.     MovieExportComponent = ComponentInstance;
  1389.  
  1390. CONST
  1391.     MovieImportType = 'eat ';
  1392.     MovieExportType = 'spit';
  1393.     
  1394.     canMovieImportHandles = 1;
  1395.     canMovieImportFiles = 2;
  1396.     hasMovieImportUserInterface = 4;
  1397.     canMovieExportHandles = 8;
  1398.     canMovieExportFiles = $10;
  1399.     hasMovieExportUserInterface = $20;
  1400.     dontAutoFileMovieImport = $40;
  1401.  
  1402.     kMovieImportExportOpenSelect = kComponentOpenSelect;
  1403.     kMovieImportExportCloseSelect = kComponentCloseSelect;
  1404.     kMovieImportExportCanDoSelect = kComponentCanDoSelect;
  1405.     kMovieImportExportVersionSelect = kComponentVersionSelect; 
  1406.  
  1407.     kMovieImportHandleSelect = 1;
  1408.     kMovieImportFileSelect = 2;
  1409.     kMovieImportSetFrameDurationSelect = 3;
  1410.     kMovieImportSetSampleDescriptionSelect = 4;
  1411.     kMovieImportSetMediaFileSelect = 5;
  1412.     kMovieImportSetDimensionsSelect = 6;
  1413.     kMovieImportSetChunkSizeSelect = 7;
  1414.     kMovieImportSetProgressProcSelect = 8;
  1415.     kMovieImportSetAuxiliaryDataSelect = 9;
  1416.     kMovieImportSetFromScrapSelect = $A;
  1417.     kMovieImportDoUserDialogSelect = $B;
  1418.     kMovieImportSetDuration = $C;
  1419.  
  1420.     kMovieExportToHandleSelect = $80;
  1421.     kMovieExportToFileSelect = $81;
  1422.     kMovieExportDoUserDialogSelect = $82;
  1423.     kMovieExportGetAuxiliaryDataSelect = $83;
  1424.     kMovieExportSetProgressProcSelect = $84;
  1425.  
  1426.     movieImportCreateTrack = 1;
  1427.     movieImportInParallel = 2;
  1428.     movieImportMustUseTrack = 4;
  1429.  
  1430.     movieImportResultUsedMultipleTracks = 8;
  1431.  
  1432.  
  1433. FUNCTION    MovieImportHandle(ci:MovieImportComponent; dataH: Handle; theMovie: Movie; targetTrack: Track; VAR usedTrack: Track; atTime: TimeValue; VAR addedDuration: TimeValue;
  1434.         inFlags: LONGINT; VAR outFlags: LONGINT): ComponentResult;
  1435.     INLINE $2F3C,$20,$1,$7000,$A82A;
  1436.  
  1437. FUNCTION    MovieImportFile(ci:MovieImportComponent; theFile:FSSpec; theMovie: Movie; targetTrack: Track; VAR usedTrack: Track; atTime: TimeValue; VAR addedDuration: TimeValue;
  1438.     inFlags: LONGINT; VAR outFlags: LONGINT): ComponentResult;
  1439.     INLINE $2F3C,$20,$2,$7000,$A82A;
  1440.  
  1441. FUNCTION    MovieImportSetSampleDuration(ci:MovieImportComponent; duration: TimeValue; scale: TimeScale): ComponentResult;
  1442.     INLINE $2F3C,$8,$3,$7000,$A82A;
  1443.  
  1444. FUNCTION    MovieImportSetSampleDescription(ci:MovieImportComponent; desc: SampleDescriptionHandle; mediaType: OSType): ComponentResult;
  1445.     INLINE $2F3C,$8,$4,$7000,$A82A;
  1446.  
  1447. FUNCTION    MovieImportSetMediaFile(ci:MovieImportComponent; alias: AliasHandle): ComponentResult;
  1448.     INLINE $2F3C,$4,$5,$7000,$A82A;
  1449.  
  1450. FUNCTION    MovieImportSetDimensions(ci:MovieImportComponent; width,height: Fixed): ComponentResult;
  1451.     INLINE $2F3C,$8,$6,$7000,$A82A;
  1452.  
  1453. FUNCTION    MovieImportSetChunkSize(ci:MovieImportComponent; chunkSize:LONGINT): ComponentResult;
  1454.     INLINE $2F3C,$4,$7,$7000,$A82A;
  1455.  
  1456. FUNCTION    MovieImportSetProgressProc(ci:MovieImportComponent; proc: ProcPtr; refCon: LONGINT): ComponentResult;
  1457.     INLINE $2F3C,$8,$8,$7000,$A82A;
  1458.  
  1459. FUNCTION    MovieImportSetAuxiliaryData(ci:MovieImportComponent; data: Handle; handleType: OSType): ComponentResult;
  1460.     INLINE    $2F3C,$8,$9,$7000,$A82A;
  1461.  
  1462. FUNCTION    MovieImportSetFromScrap(ci:MovieImportComponent; fromScrap: BOOLEAN): ComponentResult;
  1463.     INLINE    $2F3C,$2,$A,$7000,$A82A;
  1464.  
  1465. FUNCTION    MovieImportDoUserDialog(ci:MovieImportComponent; srcFile: FSSpec; data: Handle; VAR canceled: BOOLEAN): ComponentResult;
  1466.     INLINE    $2F3C,$C,$B,$7000,$A82A;
  1467.  
  1468. FUNCTION    MovieImportSetDuration(ci:MovieImportComponent; duration: TimeValue):ComponentResult;
  1469.  INLINE $2F3C,$4,$C,$7000,$A82A;
  1470.  
  1471. FUNCTION    MovieExportToHandle(ci:MovieExportComponent; data: Handle; theMovie: Movie; onlyThisTrack: Track; startTime: TimeValue; duration: TimeValue): ComponentResult;
  1472.     INLINE    $2F3C,$14,$80,$7000,$A82A;
  1473.  
  1474. FUNCTION    MovieExportToFile(ci:MovieExportComponent;dstFile: FSSpec; theMovie: Movie; onlyThisTrack: Track; startTime: TimeValue; duration: TimeValue): ComponentResult;
  1475.     INLINE    $2F3C,$14,$81,$7000,$A82A;
  1476.  
  1477. FUNCTION    MovieExportDoUserDialog(ci:MovieExportComponent; dstFile: FSSpec; data: Handle; VAR canceled: BOOLEAN): ComponentResult;
  1478.     INLINE    $2F3C,$C,$82,$7000,$A82A;
  1479.  
  1480. FUNCTION    MovieExportGetAuxiliaryData(ci:MovieExportComponent; dstFile: Handle; VAR handleType: OSType): ComponentResult;
  1481.     INLINE    $2F3C,$8,$83,$7000,$A82A;
  1482.  
  1483. FUNCTION    MovieExportSetProgressProc(ci:MovieExportComponent; proc: ProcPtr; refCon: LONGINT): ComponentResult;
  1484.     INLINE    $2F3C,$8,$84,$7000,$A82A;
  1485.  
  1486.  
  1487. TYPE
  1488.  
  1489. pnotComponent = ComponentInstance;
  1490.  
  1491. CONST
  1492. pnotComponentWantsEvents = 1;
  1493. pnotComponentNeedsNoCache = 2;
  1494.  
  1495. kPreviewOpenSelector = 0;
  1496. kPreviewCloseSelector = -1;
  1497. kPreviewCanDoSelector = -2;
  1498. kPreviewVersionSelector = -3; 
  1499.  
  1500. kPreviewShowDataSelector = 1;
  1501. kPreviewMakePreviewSelector = 2;
  1502. kPreviewMakePreviewReferenceSelector = 3;
  1503. kPreviewEventSelector = 4;
  1504.  
  1505. ShowFilePreviewComponentType = 'pnot';
  1506. CreateFilePreviewrComponentType = 'pmak';
  1507.  
  1508. FUNCTION PreviewShowData(p:pnotComponent; dataType:OSType; data:Handle;
  1509.         VAR inHere:Rect): ComponentResult;
  1510.     INLINE    $2F3C,$C,$1,$7000,$A82A;
  1511.  
  1512. FUNCTION PreviewMakePreview(p:pnotComponent; VAR previewType:OSType; VAR previewResult: Handle;
  1513.             VAR sourceFile:FSSpec; progress:ProgressProcRecordPtr ): ComponentResult;
  1514.     INLINE    $2F3C,$10,$2,$7000,$A82A;
  1515.  
  1516. FUNCTION PreviewMakePreviewReference(p:pnotComponent; VAR previewType:OSType; VAR reID:INTEGER;
  1517.             VAR sourceFile: FSSpec): ComponentResult;
  1518.     INLINE    $2F3C,$C,$3,$7000,$A82A;
  1519.  
  1520. FUNCTION PreviewEvent(p:pnotComponent; VAR e:EventRecord; VAR handledEvent:BOOLEAN): ComponentResult;
  1521.     INLINE    $2F3C,$8,$4,$7000,$A82A;
  1522.  
  1523.  
  1524. {$ENDC} { UsingQuickTimeComponents }
  1525.  
  1526. {$IFC NOT UsingIncludes}
  1527.  END.
  1528. {$ENDC}
  1529.  
  1530.